package com.ryder.ryderschool.entity;

import com.baomidou.mybatisplus.annotation.*;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Positive;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@TableName("project_funding")
public class ProjectFunding {
    @TableId(type = IdType.AUTO)
    private Integer id;
    
    @NotNull(message = "项目ID不能为空")
    private Integer projectId;
    
    @NotNull(message = "金额不能为空")
    @Positive(message = "金额必须大于0")
    private BigDecimal amount;
    
    @NotBlank(message = "用途不能为空")
    private String purpose;
    
    @NotBlank(message = "状态不能为空")
    private String status;
    
    private String comment;
    
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdAt;
    
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;
    
    @TableLogic
    private Integer deleted;
} 